package org.tio.sitexxx.web.server.controller.minip;

import org.tio.http.server.annotation.RequestPath;
import org.tio.sitexxx.service.model.main.Member;
import org.tio.sitexxx.service.service.qj.MemberService;


import java.util.HashMap;
import java.util.Map;

@RequestPath("/balance")
public class BalanceController {
    /**
     * 返回用户余额
     * @param openid
     * @return
     */
    @RequestPath("/balance")
    public Map<String,Object> balance(String openid){
        Map<String,Object> map = new HashMap<>();
        map.put("openid",openid);
        Member member = MemberService.me.getMemberWithoutCatch(map);
        map.clear();
        map.put("balance",member.getBalance());
        System.out.println("balance："+member.getBalance());
        return map;
    }

}
